
<!-- saved from url=(0030)https://wgld.org/s/sample_067/ -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		
		<title>wgld.org WebGL sample</title>
		<script src="./wgld.org WebGL sample ,67P 是快进,O 是还原_files/minMatrixb.js" type="text/javascript"></script>
		<script src="./wgld.org WebGL sample ,67P 是快进,O 是还原_files/script.js" type="text/javascript"></script>
		
		<script id="vs" type="x-shader/x-vertex">
attribute vec3 position;
attribute vec4 color;
attribute vec2 textureCoord;
uniform   mat4 mvpMatrix;
varying   vec4 vColor;
varying   vec2 vTextureCoord;

void main(void){
	vColor        = color;
	vTextureCoord = textureCoord;
	gl_Position   = mvpMatrix * vec4(position, 1.0);
}
		</script>
		
		<script id="fs" type="x-shader/x-fragment">
precision mediump float;

uniform sampler2D texture;
varying vec4      vColor;
varying vec2      vTextureCoord;

void main(void){
	vec4 smpColor = texture2D(texture, vTextureCoord);
	gl_FragColor  = vColor * smpColor;
}
		</script>
	</head>
	<body>
		<canvas id="canvas" width="512" height="512"></canvas>
	
</body></html>